home *** CD-ROM | disk | FTP | other *** search
/ Champak 146 / (Vol 146) Jan 07 2012.iso / Games / scuba.swf / scripts / DefineSprite_307 / frame_12 / DoAction.as
Text File  |  2012-01-07  |  524b  |  10 lines

  1. if(0 < _root.allOxyTanks.length)
  2. {
  3.    vToPull = Math.floor(Math.random() * Number(_root.allOxyTanks.length));
  4.    _root.activeOxyTanks.push(_root.allOxyTanks[vToPull]);
  5.    setProperty(eval("_root." + _root.allOxyTanks[vToPull]), _Y, Number(_root.TOP_BOUND) + Number(Math.random() * Number(_root.BOTTOM_BOUND - Number(_root.TOP_BOUND))));
  6.    set("_root." + _root.allOxyTanks[vToPull] + ".status","active");
  7.    eval("_root." + _root.allOxyTanks[vToPull]).gotoAndStop("base");
  8.    _root.allOxyTanks.splice(vToPull,1);
  9. }
  10.